package com.financing.platform.dao.impl;

import java.sql.SQLException;
import java.util.List;

import org.springframework.stereotype.Repository;

import com.financing.platform.dao.IFpProjectActivitiesDao;
import com.financing.platform.dto.ProjectActivitiesDTO;
import com.financing.platform.util.SqlName.projectActivitiesSql;

@Repository("fpProjectActivitiesDaoImpl")
public class FpProjectActivitiesDaoImpl extends BaseDaoImpl implements IFpProjectActivitiesDao {

	@Override
	public int addFpProjectActivities(ProjectActivitiesDTO projectActivitiesDTO) throws SQLException {
		return (Integer) this.sqlMapClient.insert(projectActivitiesSql.insertProjectActivities,projectActivitiesDTO);
	}

	@Override
	public List<ProjectActivitiesDTO> queryProjectActivities(
			ProjectActivitiesDTO projectActivitiesDTO) throws SQLException {
		return this.sqlMapClient.queryForList(projectActivitiesSql.queryProjectActivities,projectActivitiesDTO);
	}

	@Override
	public int queryProjectActivitiesCount(
			ProjectActivitiesDTO projectActivitiesDTO) throws SQLException {
		return (Integer) this.sqlMapClient.queryForObject(projectActivitiesSql.queryProjectActivitiesCount,projectActivitiesDTO);
	}

	@Override
	public int updateProjectActivities(ProjectActivitiesDTO projectActivitiesDTO)
			throws SQLException {
		return (Integer)this.sqlMapClient.update(projectActivitiesSql.updateProjectActivities,projectActivitiesDTO);
	}
	
	
}
